// 定义几何类型枚举
enum GeometryType {
  All = 'all',
  Point = 'point',
  Line = 'line',
  Polygon = 'polygon',
}
//图层预览下拉框
interface layerPreviewOption {
  value: string
  label: string
}
// 定义字典配置项接口
interface DictionaryConfig {
  geometryType: Record<GeometryType, string[]>,
  previewTypeOptions:{
    label:string
    options:layerPreviewOption[]
  }[],
  commonEncodings:string[]
}
export const DICTIONARY: DictionaryConfig = {
  geometryType: {
      all: ['Geometry', 'Polygon', 'Point', 'LineString', 'MultiPolygon', 'MultiLineString', 'MultiPoint'],
      point: ['Point', 'MultiPoint'],
      line: ['LineString', 'MultiLineString'],
      polygon: ['MultiPolygon', 'Polygon'],
  },
  previewTypeOptions:[
    {
      label: 'WMS',
      options: [
        {
          value: 'image/png',
          label: 'PNG',
        },
        {
          value: 'image/png8',
          label: 'PNG8',
        },
        {
          value: 'image/jpeg',
          label: 'JPEG',
        },
        {
          value: 'image/vnd.jpeg-png',
          label: 'JPEG-PNG',
        },
        {
          value: 'image/vnd.jpeg-png8',
          label: 'JPEG-PNG8',
        },
        {
          value: 'image/gif',
          label: 'GIF',
        },
        {
          value: 'image/tiff',
          label: 'TIFF',
        },
        {
          value: 'image/tiff8',
          label: 'TIFF8',
        },
        {
          value: 'image/geotiff',
          label: 'GeoTIFF',
        },
        {
          value: 'image/geotiff8',
          label: 'GeoTIFF8',
        },
        {
          value: 'image/svg',
          label: 'SVG',
        },
        {
          value: 'application/pdf',
          label: 'PDF',
        },
        {
          value: 'rss',
          label: 'GeoRSS',
        },
        {
          value: 'kml',
          label: 'KML',
        },
        {
          value: 'kmz',
          label: 'KMZ',
        },
        {
          value: 'text/mapml',
          label: 'MapML',
        },
        {
          value: 'text/html; subtype=mapml',
          label: 'MapML HTML Viewer',
        },
        {
          value: 'application/openlayers',
          label: 'OpenLayers',
        },
        {
          value: 'application/json;type=utfgrid',
          label: 'UTFGrid',
        },
      ],
    },
    {
      label: 'WFS',
      options: [
        {
          value: 'application/json',
          label: 'JSON',
        },
        {
          value: 'shape-zip',
          label: 'Shapefile',
        },
        {
          value: 'csv',
          label: 'CSV',
        },
        {
          value: 'GML2',
          label: 'GML2',
        },
        {
          value: 'GML3',
          label: 'GML3',
        },
        {
          value: 'JSONP',
          label: 'text/javascript',
        },
      ],
    },
  ],
  // 常见的字符编码列表
  commonEncodings : [
    'UTF-8',
    'ISO-8859-1',
    'Windows-1252',
    'ASCII',
    'UTF-16',
    'ISO-8859-2',
    'ISO-8859-5',
    'ISO-8859-7',
    'ISO-8859-15',
    'Big5',
    'GB2312',
    'GBK',
    'GB18030',
    'Shift_JIS',
    'EUC-JP'
  ]
}
